this._settings = new Gio.Settings({ schema: LOGIN_SCREEN_SCHEMA });
- this._cancellable = new Gio.Cancellable();
-
this._fprintManager = new Fprint.FprintManager();
- this._checkForFingerprintReader();
-
this._realmManager = new Realmd.Manager();
},
begin: function(userName, hold) {
+ this._cancellable = new Gio.Cancellable();
this._hold = hold;
this._userName = userName;
+ this._checkForFingerprintReader();
+
if (userName) {
// If possible, reauthenticate an already running session,
// so any session specific credentials get updated appropriately
},
cancel: function() {
- this._cancellable.cancel();
+ if (this._cancellable)
+ this._cancellable.cancel();
if (this._userVerifier)
this._userVerifier.call_cancel_sync(null);
- this._cancellable = new Gio.Cancellable();
},
clear: function() {
- this._cancellable.cancel();
+ if (this._cancellable) {
+ this._cancellable.cancel();
+ this._cancellable = null;
+ }
if (this._userVerifier) {
this._userVerifier.run_dispose();
this._hold.release();
} catch (e) {
if (this._reauthOnly) {
- logError(e, 'Failed to open reauthentication channel');
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
- this._hold.release();
+ logError(e, 'Failed to open reauthentication channel');
this.emit('verification-failed');
-
+ this._hold.release();
return;
}
},
_userVerifierGot: function(client, result) {
- this._userVerifier = client.get_user_verifier_finish(result);
+ try {
+ this._userVerifier = client.get_user_verifier_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.ErrorEnum.CANCELLED)) {
+ return;
+ }
+
this._connectSignals();
this._beginVerification();
-
this._hold.release();
},
this._userName,
this._cancellable,
Lang.bind(this, function(obj, result) {
- obj.call_begin_verification_for_user_finish(result);
+ try {
+ obj.call_begin_verification_for_user_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
+ return;
+ }
+
this._hold.release();
}));
this._userName,
this._cancellable,
Lang.bind(this, function(obj, result) {
- obj.call_begin_verification_for_user_finish(result);
+ try {
+ obj.call_begin_verification_for_user_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
+ return;
+ }
+
this._hold.release();
}));
}
this._userVerifier.call_begin_verification(PASSWORD_SERVICE_NAME,
this._cancellable,
Lang.bind(this, function(obj, result) {
- obj.call_begin_verification_finish(result);
+ try {
+ obj.call_begin_verification_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
+ return;
+ }
+
this._hold.release();
}));
}
this._userVerifier.run_dispose();
this._userVerifier = null;
- this._checkForFingerprintReader();
-
this.emit('reset');
},